.class Les/z9$a;
.super Ljava/lang/Object;
.source "AudioVolumePlayer.java"

# interfaces
.implements Les/m7$h;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Les/z9;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field a:Z

.field private b:Z

.field final synthetic c:Les/z9;


# direct methods
.method constructor <init>(Les/z9;)V
    .locals 0

    .line 1
    iput-object p1, p0, Les/z9$a;->c:Les/z9;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 p1, 0x0

    .line 2
    iput-boolean p1, p0, Les/z9$a;->a:Z

    .line 3
    iput-boolean p1, p0, Les/z9$a;->b:Z

    return-void
.end method


# virtual methods
.method public a(Les/m7;Z)V
    .locals 0

    return-void
.end method

.method public a(Les/m7;ZLandroid/media/MediaFormat;)V
    .locals 2

    const/4 p2, 0x0

    const-string v0, "sample-rate"

    .line 5
    invoke-static {p3, v0, p2}, Lcom/esfile/screen/recorder/media/util/s;->a(Landroid/media/MediaFormat;Ljava/lang/String;I)I

    move-result v0

    const-string v1, "channel-count"

    .line 6
    invoke-static {p3, v1, p2}, Lcom/esfile/screen/recorder/media/util/s;->a(Landroid/media/MediaFormat;Ljava/lang/String;I)I

    move-result p2

    .line 7
    iget-object p3, p0, Les/z9$a;->c:Les/z9;

    invoke-static {p3}, Les/z9;->a(Les/z9;)Les/z9$c;

    move-result-object p3

    invoke-virtual {p3, v0, p2}, Les/z9$c;->a(II)Z

    move-result p2

    if-nez p2, :cond_0

    const/4 p2, 0x1

    .line 8
    iput-boolean p2, p0, Les/z9$a;->b:Z

    .line 9
    iget-object p2, p0, Les/z9$a;->c:Les/z9;

    invoke-static {p2}, Les/z9;->a(Les/z9;)Les/z9$c;

    move-result-object p2

    invoke-virtual {p2}, Les/z9$c;->c()V

    .line 10
    invoke-virtual {p1}, Les/m7;->stop()V

    :cond_0
    return-void
.end method

.method public a(Les/m7;ZLcom/esfile/screen/recorder/media/util/l;)V
    .locals 0

    .line 11
    iget-object p1, p3, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget p1, p1, Landroid/media/MediaCodec$BufferInfo;->flags:I

    and-int/lit8 p1, p1, 0x4

    if-eqz p1, :cond_0

    const/4 p1, 0x1

    goto :goto_0

    :cond_0
    const/4 p1, 0x0

    :goto_0
    iput-boolean p1, p0, Les/z9$a;->a:Z

    .line 12
    iget-object p1, p0, Les/z9$a;->c:Les/z9;

    invoke-static {p1}, Les/z9;->a(Les/z9;)Les/z9$c;

    move-result-object p1

    invoke-virtual {p1, p3}, Les/z9$c;->a(Lcom/esfile/screen/recorder/media/util/l;)V

    return-void
.end method

.method public a(Les/m7;ZLjava/lang/Exception;)V
    .locals 0

    .line 1
    iget-object p1, p0, Les/z9$a;->c:Les/z9;

    invoke-static {p1}, Les/z9;->a(Les/z9;)Les/z9$c;

    move-result-object p1

    invoke-virtual {p1}, Les/z9$c;->c()V

    .line 2
    iget-object p1, p0, Les/z9$a;->c:Les/z9;

    invoke-static {p1}, Les/z9;->b(Les/z9;)Les/z9$e;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 3
    iget-object p1, p0, Les/z9$a;->c:Les/z9;

    invoke-static {p1}, Les/z9;->b(Les/z9;)Les/z9$e;

    move-result-object p1

    iget-object p2, p0, Les/z9$a;->c:Les/z9;

    invoke-interface {p1, p2, p3}, Les/z9$e;->a(Les/z9;Ljava/lang/Exception;)V

    .line 4
    :cond_0
    iget-object p1, p0, Les/z9$a;->c:Les/z9;

    invoke-virtual {p1}, Les/z9;->g()V

    return-void
.end method

.method public b(Les/m7;Z)V
    .locals 2

    .line 1
    iget-object p1, p0, Les/z9$a;->c:Les/z9;

    invoke-static {p1}, Les/z9;->a(Les/z9;)Les/z9$c;

    move-result-object p1

    invoke-virtual {p1}, Les/z9$c;->c()V

    .line 2
    iget-boolean p1, p0, Les/z9$a;->b:Z

    if-eqz p1, :cond_0

    iget-object p1, p0, Les/z9$a;->c:Les/z9;

    invoke-static {p1}, Les/z9;->b(Les/z9;)Les/z9$e;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 3
    iget-object p1, p0, Les/z9$a;->c:Les/z9;

    invoke-static {p1}, Les/z9;->b(Les/z9;)Les/z9$e;

    move-result-object p1

    iget-object p2, p0, Les/z9$a;->c:Les/z9;

    new-instance v0, Ljava/lang/RuntimeException;

    const-string v1, "AudioTrack setup failed"

    invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    invoke-interface {p1, p2, v0}, Les/z9$e;->a(Les/z9;Ljava/lang/Exception;)V

    :cond_0
    return-void
.end method

.method public b(Les/m7;ZLandroid/media/MediaFormat;)V
    .locals 2

    .line 4
    iget-object p1, p0, Les/z9$a;->c:Les/z9;

    const-string p2, "durationUs"

    const-wide/16 v0, 0x0

    invoke-static {p3, p2, v0, v1}, Lcom/esfile/screen/recorder/media/util/s;->a(Landroid/media/MediaFormat;Ljava/lang/String;J)J

    move-result-wide p2

    long-to-int p3, p2

    div-int/lit16 p3, p3, 0x3e8

    invoke-static {p1, p3}, Les/z9;->a(Les/z9;I)I

    return-void
.end method

.method public c(Les/m7;Z)V
    .locals 0

    .line 1
    invoke-virtual {p1}, Les/m7;->f()V

    .line 2
    iget-boolean p1, p0, Les/z9$a;->a:Z

    if-nez p1, :cond_0

    const/4 p1, 0x1

    .line 3
    iput-boolean p1, p0, Les/z9$a;->a:Z

    .line 4
    iget-object p1, p0, Les/z9$a;->c:Les/z9;

    invoke-static {p1}, Les/z9;->a(Les/z9;)Les/z9$c;

    move-result-object p1

    invoke-static {}, Lcom/esfile/screen/recorder/media/util/l;->c()Lcom/esfile/screen/recorder/media/util/l;

    move-result-object p2

    invoke-virtual {p1, p2}, Les/z9$c;->a(Lcom/esfile/screen/recorder/media/util/l;)V

    :cond_0
    return-void
.end method
